#pragma once

#include <cv.h>
#include <highgui.h>
#include <vector>

using namespace std;

class Hist
{
	IplImage* rgb;
	IplImage* r_plane;
	IplImage* g_plane;
	IplImage* b_plane;		
public:	
	Hist(CvSize size);
	~Hist(void);
	vector<float> computeHist(IplImage* image, CvRect rect);
	CvHistogram* computeCvHist(IplImage* image, CvRect rect);
	void initRGBImage(IplImage* image);
	vector<float> extractHist(CvHistogram* histR, CvHistogram* histG, CvHistogram* histB);
	double computeBhattachayyaDistance(CvHistogram* histA, CvHistogram* histB);
};
